﻿using System.Collections.Generic;
using System.ComponentModel;
using Cysharp.Threading.Tasks;
using Internal.KuiHuaBaoDian.Services.Guide;
using KuiHuaBaoDian.Services.Guide;

namespace KuiHuaBaoDian.Services.Guide {

    public interface IGuideQuery {
    }

    public abstract class GuideQuery : GuideStepStart, IGuideQuery, IGuideQueryInternal {

        IReadOnlyList<GuideReference> IGuideQueryInternal.ReferenceList => ReferenceList;
        protected new List<GuideReference> ReferenceList { get; private set; }

        protected override UniTask Execute() {
            ReferenceList = new List<GuideReference>();
            return UniTask.CompletedTask;
        }

        protected override void Dispose() {
            ReferenceList = null;
        }
    }
}

namespace Internal.KuiHuaBaoDian.Services.Guide {

    [EditorBrowsable(EditorBrowsableState.Never)]
    public interface IGuideQueryInternal : IGuideQuery {

        IReadOnlyList<GuideReference> ReferenceList { get; }
    }
}
